USE [master]
GO

ALTER DATABASE [DBName] SET OFFLINE WITH ROLLBACK IMMEDIATE;
GO

DROP DATABASE [DBName]
GO

